Integrand size = 31, antiderivative size = 62 \[ \int \frac {\sec ^2(c+d x) (A+B \sec (c+d x))}{a+a \sec (c+d x)} \, dx=\frac {(A-B) \text {arctanh}(\sin (c+d x))}{a d}+\frac {B \tan (c+d x)}{a d}-\frac {(A-B) \tan (c+d x)}{d (a+a \sec (c+d x))} \]
[Out]
Time = 0.15 (sec) , antiderivative size = 62, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.161, Rules used = {4093, 3872, 3855, 3852, 8} \[ \int \frac {\sec ^2(c+d x) (A+B \sec (c+d x))}{a+a \sec (c+d x)} \, dx=\frac {(A-B) \text {arctanh}(\sin (c+d x))}{a d}-\frac {(A-B) \tan (c+d x)}{d (a \sec (c+d x)+a)}+\frac {B \tan (c+d x)}{a d} \]
[In]
[Out]
Rule 8
Rule 3852
Rule 3855
Rule 3872
Rule 4093
Rubi steps \begin{align*} \text {integral}& = -\frac {(A-B) \tan (c+d x)}{d (a+a \sec (c+d x))}-\frac {\int \sec (c+d x) (-a (A-B)-a B \sec (c+d x)) \, dx}{a^2} \\ & = -\frac {(A-B) \tan (c+d x)}{d (a+a \sec (c+d x))}+\frac {(A-B) \int \sec (c+d x) \, dx}{a}+\frac {B \int \sec ^2(c+d x) \, dx}{a} \\ & = \frac {(A-B) \text {arctanh}(\sin (c+d x))}{a d}-\frac {(A-B) \tan (c+d x)}{d (a+a \sec (c+d x))}-\frac {B \text {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{a d} \\ & = \frac {(A-B) \text {arctanh}(\sin (c+d x))}{a d}+\frac {B \tan (c+d x)}{a d}-\frac {(A-B) \tan (c+d x)}{d (a+a \sec (c+d x))} \\ \end{align*}
Time = 0.52 (sec) , antiderivative size = 47, normalized size of antiderivative = 0.76 \[ \int \frac {\sec ^2(c+d x) (A+B \sec (c+d x))}{a+a \sec (c+d x)} \, dx=\frac {(A-B) \text {arctanh}(\sin (c+d x))+(-A+2 B+B \sec (c+d x)) \tan \left (\frac {1}{2} (c+d x)\right )}{a d} \]
[In]
[Out]
Time = 0.82 (sec) , antiderivative size = 93, normalized size of antiderivative = 1.50
method | result | size |
parallelrisch | \(\frac {-\cos \left (d x +c \right ) \left (A -B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+\cos \left (d x +c \right ) \left (A -B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\left (A -2 B \right ) \cos \left (d x +c \right )-B \right )}{a d \cos \left (d x +c \right )}\) | \(93\) |
derivativedivides | \(\frac {-\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) A +\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) B -\frac {B}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}+\left (A -B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-\frac {B}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}+\left (-A +B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d a}\) | \(100\) |
default | \(\frac {-\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) A +\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) B -\frac {B}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}+\left (A -B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-\frac {B}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}+\left (-A +B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d a}\) | \(100\) |
norman | \(\frac {-\frac {\left (A -3 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a d}+\frac {2 \left (A -2 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{a d}-\frac {\left (A -B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{a d}}{\left (-1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{2}}+\frac {\left (A -B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{a d}-\frac {\left (A -B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{a d}\) | \(138\) |
risch | \(-\frac {2 i \left (A \,{\mathrm e}^{2 i \left (d x +c \right )}-B \,{\mathrm e}^{2 i \left (d x +c \right )}-B \,{\mathrm e}^{i \left (d x +c \right )}+A -2 B \right )}{d a \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) A}{a d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) B}{a d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) A}{a d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) B}{a d}\) | \(163\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 127 vs. \(2 (62) = 124\).
Time = 0.28 (sec) , antiderivative size = 127, normalized size of antiderivative = 2.05 \[ \int \frac {\sec ^2(c+d x) (A+B \sec (c+d x))}{a+a \sec (c+d x)} \, dx=\frac {{\left ({\left (A - B\right )} \cos \left (d x + c\right )^{2} + {\left (A - B\right )} \cos \left (d x + c\right )\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left ({\left (A - B\right )} \cos \left (d x + c\right )^{2} + {\left (A - B\right )} \cos \left (d x + c\right )\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left ({\left (A - 2 \, B\right )} \cos \left (d x + c\right ) - B\right )} \sin \left (d x + c\right )}{2 \, {\left (a d \cos \left (d x + c\right )^{2} + a d \cos \left (d x + c\right )\right )}} \]
[In]
[Out]
\[ \int \frac {\sec ^2(c+d x) (A+B \sec (c+d x))}{a+a \sec (c+d x)} \, dx=\frac {\int \frac {A \sec ^{2}{\left (c + d x \right )}}{\sec {\left (c + d x \right )} + 1}\, dx + \int \frac {B \sec ^{3}{\left (c + d x \right )}}{\sec {\left (c + d x \right )} + 1}\, dx}{a} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 196 vs. \(2 (62) = 124\).
Time = 0.22 (sec) , antiderivative size = 196, normalized size of antiderivative = 3.16 \[ \int \frac {\sec ^2(c+d x) (A+B \sec (c+d x))}{a+a \sec (c+d x)} \, dx=-\frac {B {\left (\frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a} - \frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a} - \frac {2 \, \sin \left (d x + c\right )}{{\left (a - \frac {a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (d x + c\right ) + 1\right )}} - \frac {\sin \left (d x + c\right )}{a {\left (\cos \left (d x + c\right ) + 1\right )}}\right )} - A {\left (\frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a} - \frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a} - \frac {\sin \left (d x + c\right )}{a {\left (\cos \left (d x + c\right ) + 1\right )}}\right )}}{d} \]
[In]
[Out]
none
Time = 0.30 (sec) , antiderivative size = 109, normalized size of antiderivative = 1.76 \[ \int \frac {\sec ^2(c+d x) (A+B \sec (c+d x))}{a+a \sec (c+d x)} \, dx=\frac {\frac {{\left (A - B\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{a} - \frac {{\left (A - B\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{a} - \frac {A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a} - \frac {2 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )} a}}{d} \]
[In]
[Out]
Time = 13.66 (sec) , antiderivative size = 79, normalized size of antiderivative = 1.27 \[ \int \frac {\sec ^2(c+d x) (A+B \sec (c+d x))}{a+a \sec (c+d x)} \, dx=\frac {2\,B\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (a-a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )}+\frac {2\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (A-B\right )}{a\,d}-\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (A-B\right )}{a\,d} \]
[In]
[Out]